package com.winit.flow.repository;

import com.winit.flow.model.FlowLegendRelation;
import com.winit.flow.model.FlowLegendRelationId;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

public interface FlowLegendRelationRepository extends CrudRepository<FlowLegendRelation, FlowLegendRelationId>{
    @Transactional
    @Modifying
    @Query(value = "delete from matrix_flow_legend_relation where  flow_id = ?1", nativeQuery = true)
    int deleteByFlowId(String flowId);
}
